package fatworm.parser.syntree;
/**
 * syntax query node
 * create index
 */
public class CreateIndexNode extends QueryNode{
	public boolean unique;
	public String indexName,tableName,fieldName;
	public CreateIndexNode( String indexName , String tableName , 
			String fieldName , boolean unique ){
		this.indexName = indexName; 
		this.tableName = tableName; 
		this.fieldName = fieldName;
		this.unique = unique;
	}
	public String toString(){
		return "CREATE "+(unique?"UNIQUE ":"")+"INDEX " + indexName +" on " + tableName + "(" + fieldName+")";
	}
	public void accept( IQueryVisitor visitor ){
		visitor.visit( this );
	}
}
